<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
    <div th:replace="m/head :: head"></div>

    <title>修改手机号</title>
</head>

<body>

<div th:replace="m/head :: body('banner.hidden', 'head-no-menu', '修改手机号')"></div>

<div class="loginwrap">
    <div class="login-con retrieve-password">
        <form name="modifyForm" th:action="@{/personal/safe/modify-mobile/1}" method="post">
            <div class="top">
                <dl>
                    <dt style="background: #ff5a34;"></dt>
                    <dd style="color: #ff5a34;">进行安全验证</dd>
                </dl>
                <dl>
                    <dt></dt>
                    <dd>设置新手机</dd>
                </dl>
                <dl>
                    <dt></dt>
                    <dd>设置成功</dd>
                </dl>
            </div>
            <div class="login-input">
                <div class="login-text clearfix">
                    <div class="left">
                        原手机号
                    </div>
                    <div class="right">
                        <input type="text" name="mobile" th:value="${currentUser.mobile}" readonly/>
                    </div>
                </div>
                <div class="verify-text clearfix">
                    <div class="login-text" style="float: left;">
                        <div class="left">
                            短信验证码
                        </div>
                        <div class="right">
                            <input type="text" name="smsCode" value=""/>
                        </div>
                    </div>
                    <button type="button" class="verify-btn get-own-sms-code">获取验证码</button>
                </div>
                <p class="error" th:text="${error}"></p>
            </div>
            <div class="bootom-btn">
                <button type="button" class="submit" id="submit-btn" style="display: block;">下一步</button>
                <!--<a href="javascript:void(0)" class="submit" style="display: block;">下一步</a>-->
            </div>
        </form>
    </div>
</div>

<div class="foot-box"></div>

<div th:replace="m/foot :: foot"></div>

</body>

<div th:replace="m/foot :: footer('baidu.hide')"></div>

<script>
    $(function () {
        $('#submit-btn').click(function () {
            if ($.trim($('input[name="smsCode"]').val()) == 0) {
                $('.login-input .error').text('请输入短信验证码');
                return false;
            }
            $('.login-input .error').text('');
            $('input[name="smsCode"]').val($.trim($('input[name="smsCode"]')));
            window.modifyForm.submit();
        })

    })
</script>

</html>
